<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>父传子</title>
</head>
<body>

<div id="app">
  <blog-post :title="title" :content="content"></blog-post>
</div>

<script src="../lib/vue.js"></script>
<script>
Vue.component('blog-post', {
  props: ['title', 'content'],
  template: `
    <div>
      <h3>{{ title }}</h3>
      <div>{{ content }}</div>
    </div>
  `
})


let vm = new Vue({
  el: '#app',
  data: {
    title: '标题',
    content: '内容'
  }
})
</script>

</body>
</html>